const remote = require('electron').remote;
const BrowserWindow = remote.BrowserWindow;
//关闭当前窗口
function onClick_Close() {
    const win = remote.getCurrentWindow();
    win.close();
}

//创建多个窗口
function onClick_CreateMultiWindows() {
    if(global.windows == undefined) {
        //初始化Windows数组
        global.windows = [];
    }
    var win = new BrowserWindow({show:false,x:10,y:20,width:400,height:400});
    global.windows.push(win);
    win.loadFile('./child.html');
    win.on('ready-to-show',()=>{
        win.show();
    })
}
